Micron Document
🎖️GitЯра🎖️

Node / meshtastic / Meshtastic-Android / files / .github / agents / speckit.git.commit.agent.md

Displaying Rendered • View rawDownload

.github/agents/speckit.git.commit.agent.md 6b440e57e64de18d0b2bf59a52ec387e8b7cf2b8 (6b440e57) Text, 1.86 KB

description: Auto-commit changes after a Spec Kit command completes


<!-- Extension: git -->
<!-- Config: .specify/extensions/git/ -->
Auto-Commit Changes

Automatically stage and commit all changes after a Spec Kit command completes.

Behavior

This command is invoked as a hook after (or before) core commands. It:

1. Determines the event name from the hook context (e.g., if invoked as an T383838after_specify hook, the event is T383838after_specify; if T383838before_plan, the event is T383838before_plan)
2. Checks T383838.specify/extensions/git/git-config.yml for the T383838auto_commit section
3. Looks up the specific event key to see if auto-commit is enabled
4. Falls back to T383838auto_commit.default if no event-specific key exists
5. Uses the per-command T383838message if configured, otherwise a default message
6. If enabled and there are uncommitted changes, runs T383838git add . + T383838git commit

Execution

Determine the event name from the hook that triggered this command, then run the script:

Bash: T383838.specify/extensions/git/scripts/bash/auto-commit.sh <event_name>
PowerShell: T383838.specify/extensions/git/scripts/powershell/auto-commit.ps1 <event_name>

Replace T383838<event_name> with the actual hook event (e.g., T383838after_specify, T383838before_plan, T383838after_implement).

Configuration

In T383838.specify/extensions/git/git-config.yml:

T282828
Tff7b72auto_commitTb4b4b4:
Tff7b72defaultTb4b4b4: Ta5d6fffalse T8b949e# Global toggle — set true to enable for all commands
Tff7b72after_specifyTb4b4b4:
Tff7b72enabledTb4b4b4: Ta5d6fftrue T8b949e# Override per-command
Tff7b72messageTb4b4b4: Ta5d6ff"Ta5d6ff[SpecTe6edf3 Ta5d6ffKit]Te6edf3 Ta5d6ffAddTe6edf3 Ta5d6ffspecificationTa5d6ff"
Tff7b72after_planTb4b4b4:
Tff7b72enabledTb4b4b4: Ta5d6fffalse
Tff7b72messageTb4b4b4: Ta5d6ff"Ta5d6ff[SpecTe6edf3 Ta5d6ffKit]Te6edf3 Ta5d6ffAddTe6edf3 Ta5d6ffimplementationTe6edf3 Ta5d6ffplanTa5d6ff"


Graceful Degradation

• If Git is not available or the current directory is not a repository: skips with a warning
• If no config file exists: skips (disabled by default)
• If no changes to commit: skips with a message

Served by rngit 1.5.1 - Generated in 0.05s